const scanfCheck = require('./scanfCheck');
const readlindSync = require('readline-sync');//输入模块

module.exports = function addStudent(){
    let student = [];
    let s = scanfCheck.scanfStudentCheck_Re_studentObj();

    student.push(s);
    console.log("学生添加成功!");
    console.log("继续添加？1.Yes.2.No");
    let choice = readlindSync.question();
    if(choice === '1'){
        return student.concat(addStudent());
    }else{
        return student ;
    }
}
// console.log(addStudent());